abstract class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }
    public abstract void makeSound();
}
class Tiger extends Animal {
    public Tiger(String name) {
        super(name);
    }

    @Override
    public void makeSound() {
        System.out.println(name + " says: Roar!");
    }
}
class Elephant extends Animal {
    public Elephant(String name) {
        super(name);
    }

    @Override
    public void makeSound() {
        System.out.println(name + " says: Trumpet!");
    }
}
class Fox extends Animal {
    public Fox(String name) {
        super(name);
    }

    @Override
    public void makeSound() {
        System.out.println(name + " says: Yap!");
    }
}
class Panda extends Animal {
    public Panda(String name) {
        super(name);
    }

    @Override
    public void makeSound() {
        System.out.println(name + " says: Squeak!");
    }
}

public class Animalmain {
    public static void main(String[] args) {
        Animal[] animals = new Animal[10];
        for (int i = 0; i < 10; i++) {
            int randomType = (int) (Math.random() * 4);
            switch (randomType) {
                case 0:
                    animals[i] = new Tiger("Tiger" + (i + 1));
                    break;
                case 1:
                    animals[i] = new Elephant("Elephant" + (i + 1));
                    break;
                case 2:
                    animals[i] = new Fox("Fox" + (i + 1));
                    break;
                default:
                    animals[i] = new Panda("Panda" + (i + 1));
                    break;
            }
        }
        for (Animal animal : animals) {
            animal.makeSound();
        }
    }
}